********************************************************************************
* Replication Material for: Mindset to Gain? Framing Effects, Need for Chaos, and the Limits of "Burning It All Down"*

*Authors: Fitz, Erin B., Stecula, Dominik A., Hitt, Matthew P., and Saunders, Kyle L.

*Accepted for publication in Behavioural Public Policy
*September 2025

*Note: Code for the main analysis begins on line 1131

********************************************************************************
*********************************** Study 2 ************************************
********************************************************************************

*To begin this analysis, first download the following Stata Data file, found in the uploaded supporting materials: "/Chaos Study 2.dta"

*Module to calculate summated scale/indexed variables
// ssc install sumscale
	
********************************************************************************
******************************* Variable Coding ******************************** 
********************************************************************************

// destring, replace 

******************************** Demographics **********************************

*Education
// gen educationx = education
// recode educationx (6=5) (5=6)
// label var educationx ///
// "Education"
// label define educationx ///
// 1 "1 Did not complete HS" 2 "2 HS or GED" 3 "3 Some college" 4 "4 College graduate" 5 "5 Some postgraduate" 6 "Postgraduate degree"
// label values educationx educationx 
// recast double educationx

// gen education01 = (educationx-1)/5
// label var education01 ///
// "Education"
// recast double education01

*Income: omits "prefer not to say"
// gen incomex = income 
// replace incomex = . if income == 10
// label var incomex ///
// "Income"
// label define incomex ///
// 1 "1 Under 20,000" 2 "2 20,000-39,999" 3 "3 40,000-59,000" 4 "4 60,000-79,999" 5 "5 80,000-99,999" 6 "6 100,000-124,999" 7 "7 125,000-149,999" 8 "8 150,000-199,999" 9 "9 200,000 and over" 
// label values incomex incomex 
// recast double incomex

// gen income01 = (incomex-1)/8
// label var income01 ///
// "Income"
// recast double income01

*Gender: Female
// gen gender01 = gender
// recode gender01 (1=0) (2=1) (3=0) 
// label var gender01 ///
// "Gender"
// label define gender01 ///
// 0 "0 Not female" 1 "1 female"
// label values gender01 gender01 
// recast double gender01 

*Age
// gen agex = age_1
// replace agex = . if age_1 <18
// label var agex ///
// "Age"
// recast double agex

// gen age01 = (agex-18)/82
// label var age01 ///
// "Age"
// recast double age01

// *Race: White/non-white 
// destring race, generate(racex) ignore(`","')
// gen race01 = racex 
// replace race01 = . if racex == 9
// recode race01 (1=1) (nonmiss=0)
// label var race01 ///
// "Race"
// label define race01 ///
// 0 "0 Non-white" 1 "1 White"
// label values race01 race01 
// recast double race01 

// *Ethnicity: Hispanic or Latino/non-Hispanic or Latino
// gen ethnicity01 = hispanic 
// recode ethnicity01 (2=0)
// label var ethnicity01 ///
// "Ethnicity"
// label define ethnicity01 ///
// 0 "0 Not Hispanic or Latino" 1 "1 Hispanic or Latino" 
// label values ethnicity01 ethnicity01 
// recast double ethnicity01 

// *Religion: reverse coded 
// gen religionx = religion 
// recode religionx (1=5) (2=4) (4=2) (5=1)
// label var religionx ///
// "Religiosity"
// label define religionx ///
// 1 "1 Very inactive" 2 "2 Moderately inactive" 3 "3 Neither active nor inactive" 4 "4 Moderately active" 5 "5 Very active"
// label values religionx religionx 
// recast double religionx 

// gen religion01 = (religionx-1)/4
// label var religion01 ///
// "Religiosity" 
// recast double religion01 

// *Party ID 
// gen pid7x = .
// replace pid7x = 1 if partyid == 2 & strongdem == 1
// replace pid7x = 2 if partyid == 2 & strongdem == 2
// replace pid7x = 3 if partyid == 3 & lean == 1 
// replace pid7x = 4 if partyid == 3 & lean == 3 
// replace pid7x = 5 if partyid == 3 & lean == 2
// replace pid7x = 6 if partyid == 1 & strongrep == 2
// replace pid7x = 7 if partyid == 1 & strongrep == 1
// label var pid7x ///
// "Party ID"
// label define pid7x ///
// 1 "1 Strong Democrat" 2 "2 Not very strong Democrat" 3 "3 Independent-Democrat" 4 "4 Independent" 5 "5 Independent-Republican" 6 "6 Not very strong Republican" 7 "7 Strong Republican" 
// label values pid7x pid7x 
// recast double pid7x 

// gen pid701 = (pid7x-1)/6
// label var pid701 ///
// "Party ID" 
// recast double pid701 

***************************** Political Knowledge ******************************

// sumscale, f1(pk1 pk2 pk3 pk4 pk5 pk6) fdummy
// rename Factor1_dsum polknowx 
// label var polknowx ///
// "Political Knowledge"

// gen polknow01 = (polknowx)/6
// label var polknow01 ///
// "Political Knowledge"
// recast double polknow01 

********************************** Numeracy ************************************

// *Numeracy 1 (Correct Answer: 500 times) 
// tab numeracy1
// gen n1x = numeracy1 
// replace n1x = "0" if numeracy1 == "1"
// replace n1x = "1" if numeracy1 == "500"
// replace n1x = "1" if numeracy1 == "500/1000"
// replace n1x = "1" if numeracy1 == "approximately 500 times"
// replace n1x = "1" if numeracy1 == "1/2 or 500 times "
// replace n1x = "1" if numeracy1 == "50% (500 times)"
// replace n1x = "1" if numeracy1 == "500 "
// replace n1x = "1" if numeracy1 == "500 TIMES"
// replace n1x = "1" if numeracy1 == "500 Times"
// replace n1x = "1" if numeracy1 == "500 or half"
// replace n1x = "1" if numeracy1 == "500 rolls"
// replace n1x = "1" if numeracy1 == "500 time"
// replace n1x = "1" if numeracy1 == "500 times"
// replace n1x = "1" if numeracy1 == "500 times "
// replace n1x = "1" if numeracy1 == "500 times."
// replace n1x = "1" if numeracy1 == "500/1,000"
// replace n1x = "1" if numeracy1 == "About 500"
// replace n1x = "1" if numeracy1 == "Half the time 500"
// replace n1x = "1" if numeracy1 == "About 500 give or take."
// replace n1x = "1" if numeracy1 == "Around 500"
// replace n1x = "1" if numeracy1 == "about 500 times"
// replace n1x = "1" if numeracy1 == "~500"

// replace n1x = "1" if numeracy1 == "50%"
// replace n1x = "1" if numeracy1 == "50% "
// replace n1x = "1" if numeracy1 == "50%10" 
// replace n1x = "1" if numeracy1 == "50/50"
// replace n1x = "1" if numeracy1 == "About half the time"
// replace n1x = "1" if numeracy1 == "Half"
// replace n1x = "1" if numeracy1 == "Half "
// replace n1x = "1" if numeracy1 == "Half of the time"
// replace n1x = "1" if numeracy1 == "Half the time"
// replace n1x = "1" if numeracy1 == "If you roll a fair, six-sided die, each of the six faces (1, 2, 3, 4, 5, and 6) has an equal probability of landing face up. Since half of the faces are even (2, 4, and 6), and half are odd (1, 3, and 5), the probability of rolling an even number is 3/6, which simplifies to 1/2.  So, out of 1,000 rolls, you would expect approximately half of them to be even numbers. Therefore, you would expect the die to come up even (2, 4, or 6) roughly 500 times in 1,000 rolls."
// replace n1x = "1" if numeracy1 == "It depends on how the number is indicated on the die. If material is removed in dots, the 6 would weigh less and be more likely to end up on top. You know, physics and all. Of were talking purely hypothetically, then I would say 500 tines out of 1000."
// replace n1x = "1" if numeracy1 == "half"
// replace n1x = "1" if numeracy1 == "half amount of the time"
// replace n1x = "1" if numeracy1 == "half the time"
// replace n1x = "1" if numeracy1 == "have the time"

// destring n1x, generate(n1) force
// recode n1 (1=1) (nonmiss = 0) (miss = 0)
// recast double n1

// *Numeracy 2 (Correct Answer: 10 persons out of 1000)
// tab numeracy2
// gen n2x = numeracy2 
// replace n1x = "0" if numeracy1 == "1"
// replace n2x = "1" if numeracy2 == " 10"
// replace n2x = "1" if numeracy2 == "10"
// replace n2x = "1" if numeracy2 == "10 "
// replace n2x = "1" if numeracy2 == "10 People"
// replace n2x = "1" if numeracy2 == "10 people"
// replace n2x = "1" if numeracy2 == "10 people "
// replace n2x = "1" if numeracy2 == "10 people likely to win I guess"
// replace n2x = "1" if numeracy2 == "10 people would win a $10.00 prize if 1,000 people each buy a single ticket from BIG BUCKS."
// replace n2x = "1" if numeracy2 == "10 people would win the $10"
// replace n2x = "1" if numeracy2 == "10 persons" 
// replace n2x = "1" if numeracy2 == "10 tickets"
// replace n2x = "1" if numeracy2 == "10-12 people" 
// replace n2x = "1" if numeracy2 == "10.0."
// replace n2x = "1" if numeracy2 == "10.00"
// replace n2x = "1" if numeracy2 == "Best guess 10."
// replace n2x = "1" if numeracy2 == "about 10 people"
// replace n2x = "1" if numeracy2 == "about10"
// replace n2x = "1" if numeracy2 == "o, you can expect approximately 10 people to win a $10.00 prize if 1,000 people each buy a single ticket from BIG BUCKS LOTTERY."

// replace n2x = "1" if numeracy2 == "1 in 100"
// replace n2x = "1" if numeracy2 == "The chance of winning $10 is 1 %, that is, the rate of proportion is 0.01 and the total numbers of people are 1000 who has bought a single lottery ticket. Therefore, the expected number of people who will win the $10 prize is 10."

// destring n2x, generate(n2) force
// recode n2 (1=1) (nonmiss = 0) (miss = 0)
// recast double n2

// *Numeracy 3 (Correct Answer: 0.1%)
// tab numeracy3 
// gen n3x = numeracy3 
// replace n3x = "0" if numeracy3 == "1"
// replace n3x = "1" if numeracy3 == " 0.1%"
// replace n3x = "1" if numeracy3 == ",1"
// replace n3x = "1" if numeracy3 == ",1%"
// replace n3x = "1" if numeracy3 == ",10"
// replace n3x = "1" if numeracy3 == ". 10"
// replace n3x = "1" if numeracy3 == "..1"
// replace n3x = "1" if numeracy3 == ".1"
// replace n3x = "1" if numeracy3 == ".1 "
// replace n3x = "1" if numeracy3 == ".1 percent"
// replace n3x = "1" if numeracy3 == ".1 percent "
// replace n3x = "1" if numeracy3 == ".1%"
// replace n3x = "1" if numeracy3 == ".10"
// replace n3x = "1" if numeracy3 == ".10 %"
// replace n3x = "1" if numeracy3 == ".10 percent"
// replace n3x = "1" if numeracy3 == ".10%"
// replace n3x = "1" if numeracy3 == ".1@"
// replace n3x = "1" if numeracy3 == "0,1"
// replace n3x = "1" if numeracy3 == "0,1%"
// replace n3x = "1" if numeracy3 == "0.1"
// replace n3x = "1" if numeracy3 == "0.1 %"
// replace n3x = "1" if numeracy3 == "0.1 % tickets"
// replace n3x = "1" if numeracy3 == "0.1 percent"
// replace n3x = "1" if numeracy3 == "0.1 percent "
// replace n3x = "1" if numeracy3 == "0.1%"
// replace n3x = "1" if numeracy3 == "0.1%."
// replace n3x = "1" if numeracy3 == "0.1%2"
// replace n3x = "1" if numeracy3 == "0.10"
// replace n3x = "1" if numeracy3 == "0.10 %"
// replace n3x = "1" if numeracy3 == "0.10%"
// replace n3x = "1" if numeracy3 == "0.100"
// replace n3x = "1" if numeracy3 == "00.1"
// replace n3x = "1" if numeracy3 == "0.1"
// replace n3x = "1" if numeracy3 == "0.1%"

// replace n3x = "1" if numeracy3 == "1/10"
// replace n3x = "1" if numeracy3 == "1/10%"
// replace n3x = "1" if numeracy3 == "1/10th of one percent "
// replace n3x = "1" if numeracy3 == "In one study of numeracy among educated subjects, less than 25% got the following question right: In the ACME publishing sweepstakes, the chance of winning a car is 1 in 1,000. What percent of tickets win a car?3 (The correct answer is 0.1%.)"
// replace n3x = "1" if numeracy3 == "One tenth of one percent"

// destring n3x, generate(n3) force
// recode n3 (1=1) (nonmiss = 0) (miss = 0)
// recast double n3

// *Numeracy 4
// gen num4x = numeracy4 
// recode num4x (1=0) (2=0) (3=1) (miss=0)
// recast double num4x

// gen n4 = num4x
// recast double n4 

// *Numeracy 5
// gen num5x = numeracy5 
// recode num5x (1=0) (2=1) (3=0) (miss=0) 
// recast double num5x

// gen n5 = num5x 
// recast double n5

// *Numeracy 6 (Correct Answer: 2%)
// tab numeracy6
// gen n6x = numeracy6
// replace n6x = "0" if numeracy6 == "1"
// replace n6x = "1" if numeracy6 == "2%"
// replace n6x = "1" if numeracy6 == "%2"
// replace n6x = "1" if numeracy6 == "2"
// replace n6x = "1" if numeracy6 == "2 "
// replace n6x = "1" if numeracy6 == "2 %"
// replace n6x = "1" if numeracy6 == "2 % "
// replace n6x = "1" if numeracy6 == "2 % in 10 years"
// replace n6x = "1" if numeracy6 == "2 % in 10 years "
// replace n6x = "1" if numeracy6 == "2 IN 10"
// replace n6x = "1" if numeracy6 == "2 IN TEN YEARS"
// replace n6x = "1" if numeracy6 == "2 in 10"
// replace n6x = "1" if numeracy6 == "2 in 10 yrs"
// replace n6x = "1" if numeracy6 == "2 in ten year"
// replace n6x = "1" if numeracy6 == "2 in ten years"
// replace n6x = "1" if numeracy6 == "2 per cent"
// replace n6x = "1" if numeracy6 == "2 per cent "
// replace n6x = "1" if numeracy6 == "2 percent 2 8n"
// replace n6x = "1" if numeracy6 == "2 percent in 10 years"
// replace n6x = "1" if numeracy6 == "2 percent in ten years"
// replace n6x = "1" if numeracy6 == "2$"
// replace n6x = "1" if numeracy6 == "2%"
// replace n6x = "1" if numeracy6 == "2% "
// replace n6x = "1" if numeracy6 == "2%  "
// replace n6x = "1" if numeracy6 == "2%  in ten years"
// replace n6x = "1" if numeracy6 == "2% (two percent) in ten years."
// replace n6x = "1" if numeracy6 == "2% in 10"
// replace n6x = "1" if numeracy6 == "2% in 10 in ten yrs"
// replace n6x = "1" if numeracy6 == "2% in 10 years"
// replace n6x = "1" if numeracy6 == "2% in 10 years "
// replace n6x = "1" if numeracy6 == "2% in 10 years."
// replace n6x = "1" if numeracy6 == "2% in 10 years2"
// replace n6x = "1" if numeracy6 == "2% in 10 yrs"
// replace n6x = "1" if numeracy6 == "2% in 10years"
// replace n6x = "1" if numeracy6 == "2% in 10yrs"
// replace n6x = "1" if numeracy6 == "2% in ten years"
// replace n6x = "1" if numeracy6 == "2% in ten years "
// replace n6x = "1" if numeracy6 == "2% in ten years."
// replace n6x = "1" if numeracy6 == "2% in10 years"
// replace n6x = "1" if numeracy6 == "2% risk"
// replace n6x = "1" if numeracy6 == "2%,"
// replace n6x = "1" if numeracy6 == "2%1"
// replace n6x = "1" if numeracy6 == "2%10 years"
// replace n6x = "1" if numeracy6 == "2%2"
// replace n6x = "1" if numeracy6 == "2%?"
// replace n6x = "1" if numeracy6 == "2%in 10 years"
// replace n6x = "1" if numeracy6 == "2%in ten years"
// replace n6x = "1" if numeracy6 == "2%in ten years "
// replace n6x = "1" if numeracy6 == "2,%"
// replace n6x = "1" if numeracy6 == "2,,%"
// replace n6x = "1" if numeracy6 == "2/10"
// replace n6x = "1" if numeracy6 == "2^%"
// replace n6x = "1" if numeracy6 == "2percent"
// replace n6x = "1" if numeracy6 == "2percent "
// replace n6x = "1" if numeracy6 == "2percent in ten years"
// replace n6x = "1" if numeracy6 == "2℅"
// replace n6x = "1" if numeracy6 == "It is 2%"
// replace n6x = "1" if numeracy6 == "Two percent"

// destring n6x, generate(n6) force
// recode n6 (1=1) (nonmiss = 0) (miss = 0)
// recast double n6 

// *Numeracy 7 (Correct Answer: 2 out of 100)
// tab numeracy7
// gen n7x = numeracy7
// replace n7x = "0" if numeracy7 == "1"
// replace n7x = "1" if numeracy7 == " 2"
// replace n7x = "1" if numeracy7 == "2"
// replace n7x = "1" if numeracy7 == "2 "
// replace n7x = "1" if numeracy7 == "2 - 100"
// replace n7x = "1" if numeracy7 == "2 IN 100"
// replace n7x = "1" if numeracy7 == "2 IN 100 IN TEN YEARS"
// replace n7x = "1" if numeracy7 == "2 entre 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 i 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 ih 100"
// replace n7x = "1" if numeracy7 == "2 in 1 00 in ten years"
// replace n7x = "1" if numeracy7 == "2 in 100"
// replace n7x = "1" if numeracy7 == "2 in 100 "
// replace n7x = "1" if numeracy7 == "2 in 100  in yrs"
// replace n7x = "1" if numeracy7 == "2 in 100 in 10"
// replace n7x = "1" if numeracy7 == "2 in 100 in 10 years"
// replace n7x = "1" if numeracy7 == "2 in 100 in 10 years "
// replace n7x = "1" if numeracy7 == "2 in 100 in ten"
// replace n7x = "1" if numeracy7 == "2 in 100 in ten yearS"
// replace n7x = "1" if numeracy7 == "2 in 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 in 100 in ten years "
// replace n7x = "1" if numeracy7 == "2 in 100 in ten years."
// replace n7x = "1" if numeracy7 == "2 in 100 in the same conditions"
// replace n7x = "1" if numeracy7 == "2 in 100 or .02"
// replace n7x = "1" if numeracy7 == "2 in 100 or 2%"
// replace n7x = "1" if numeracy7 == "2 in 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 in 100, or 2% in ten years"
// replace n7x = "1" if numeracy7 == "2 in 100in 10 yrs"
// replace n7x = "1" if numeracy7 == "2 in 100in ten years"
// replace n7x = "1" if numeracy7 == "2 in a 100"
// replace n7x = "1" if numeracy7 == "2 in a 100 "
// replace n7x = "1" if numeracy7 == "2 in a 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 in a 100 in ten years "
// replace n7x = "1" if numeracy7 == "2 in a hundred"
// replace n7x = "1" if numeracy7 == "2 in a hundred "
// replace n7x = "1" if numeracy7 == "2 in a hundred in 10 years"
// replace n7x = "1" if numeracy7 == "2 in a100"
// replace n7x = "1" if numeracy7 == "2 in ten years"
// replace n7x = "1" if numeracy7 == "2 in ten years "
// replace n7x = "1" if numeracy7 == "2 in100"
// replace n7x = "1" if numeracy7 == "2 in100 in ten years"
// replace n7x = "1" if numeracy7 == "2 in100in ten years"
// replace n7x = "1" if numeracy7 == "2 n a 100"
// replace n7x = "1" if numeracy7 == "2 of 100"
// replace n7x = "1" if numeracy7 == "2 out of 100"
// replace n7x = "1" if numeracy7 == "2 out of 100 in ten years"
// replace n7x = "1" if numeracy7 == "2 out of a 100"
// replace n7x = "1" if numeracy7 == "2 to 100"
// replace n7x = "1" if numeracy7 == "2-100"
// replace n7x = "1" if numeracy7 == "2/100"
// replace n7x = "1" if numeracy7 == "2in 100"
// replace n7x = "1" if numeracy7 == "2in 100 in ten years"
// replace n7x = "1" if numeracy7 == "2in100"
// replace n7x = "1" if numeracy7 == "2n 100"

// destring n7x, generate(n7) force
// recode n7 (1=1) (nonmiss = 0) (miss = 0)
// recast double n7

// *Numeracy 8a (Correct Answer: 10 out of 100)
// tab numeracy8a
// gen n8ax = numeracy8a
// replace n8ax = "0" if numeracy8a == "1"
// replace n8ax = "1" if numeracy8a == "10"
// replace n8ax = "1" if numeracy8a == "10 "
// replace n8ax = "1" if numeracy8a == "10 People"
// replace n8ax = "1" if numeracy8a == "10 in 100"
// replace n8ax = "1" if numeracy8a == "10 out of 100"
// replace n8ax = "1" if numeracy8a == "10 out of 100 people"
// replace n8ax = "1" if numeracy8a == "10 people"
// replace n8ax = "1" if numeracy8a == "10 people "
// replace n8ax = "1" if numeracy8a == "10 people out of 100"
// replace n8ax = "1" if numeracy8a == "10 people would be expected to get the disease"
// replace n8ax = "1" if numeracy8a == "10.00"
// replace n8ax = "1" if numeracy8a == "10/100"
// replace n8ax = "1" if numeracy8a == "10people"
// replace n8ax = "1" if numeracy8a == "10q"
// replace n8ax = "1" if numeracy8a == "Ten"
// replace n8ax = "1" if numeracy8a == "around 10"
// replace n8ax = "1" if numeracy8a == "If the chance of getting a disease is 10%, then out of 100 people, we would expect 10 people to get the disease"

// destring n8ax, generate(n8a) force
// recode n8a (1=1) (nonmiss = 0) (miss = 0)
// recast double n8a

// *Numeracy 8b (Correct Answer: 100 out of 1000) 
// tab numeracy8b
// gen n8bx = numeracy8b
// replace n8bx = "0" if numeracy8b == "1"
// replace n8bx = "0" if numeracy8b == " 100"
// replace n8bx = "1" if numeracy8b == "100"
// replace n8bx = "1" if numeracy8b == "100 out of 1000 people"
// replace n8bx = "1" if numeracy8b == "100 People"
// replace n8bx = "1" if numeracy8b == "100 in 1000"
// replace n8bx = "1" if numeracy8b == "100 out of 1000"
// replace n8bx = "1" if numeracy8b == "100 people"
// replace n8bx = "1" if numeracy8b == "100 people "
// replace n8bx = "1" if numeracy8b == "100 people would be expected to get the disease"
// replace n8bx = "1" if numeracy8b == "100/1000"
// replace n8bx = "0" if numeracy8b == "around 100"
// replace n8bx = "0" if numeracy8b == "Same reasoning as the previous question-- normal dist would be around 100."

// destring n8bx, generate(n8b) force
// recode n8b (1=1) (nonmiss = 0) (miss = 0)
// recast double n8b

// *Numeracy 9 (Correct Answer: 20%) 
// tab numeracy9
// gen n9x = numeracy9
// replace n9x = "0" if numeracy9 == "1"
// replace n9x = "1" if numeracy9 == "20"
// replace n9x = "1" if numeracy9 == "20 "
// replace n9x = "1" if numeracy9 == "20 %"
// replace n9x = "1" if numeracy9 == "20 % people"
// replace n9x = "1" if numeracy9 == "20 pecent"
// replace n9x = "1" if numeracy9 == "20 percent"
// replace n9x = "1" if numeracy9 == "20 percent "
// replace n9x = "1" if numeracy9 == "20%"
// replace n9x = "1" if numeracy9 == "20% "
// replace n9x = "1" if numeracy9 == "20% chance "
// replace n9x = "1" if numeracy9 == "20%."
// replace n9x = "1" if numeracy9 == "20%5"
// replace n9x = "1" if numeracy9 == "20^"

// destring n9x, generate(n9) force
// recode n9 (1=1) (nonmiss = 0) (miss = 0)
// recast double n9

// *Numeracy 10 (Correct Answer: 5 people) 
// tab numeracy10
// gen n10x = numeracy10
// replace n10x = "0" if numeracy10 == "1"
// replace n10x = "1" if numeracy10 == "5"
// replace n10x = "1" if numeracy10 == "5 "
// replace n10x = "1" if numeracy10 == "5 in 10000"
// replace n10x = "1" if numeracy10 == "5 out of 10,000"
// replace n10x = "1" if numeracy10 == "5 people"
// replace n10x = "1" if numeracy10 == "5 ppl"
// replace n10x = "1" if numeracy10 == "5- There may be an error in this question?? Are you asking .0005 or .0005%?"
// replace n10x = "1" if numeracy10 == "5."
// replace n10x = "1" if numeracy10 == "Five "
// replace n10x = "1" if numeracy10 == "05"
// replace n10x = "1" if numeracy10 == "Whatever .0005 times 10k is. 5?"

// destring n10x, generate(n10) force
// recode n10 (1=1) (nonmiss = 0) (miss = 0)
// recast double n10

// *11-Item Numeracy Index 
// sumscale, f1(n1 n2 n3 n4 n5 n6 n7 n8a n8b n9 n10) fdummy
// rename Factor1_dsum numindex
// label var numindex ///
// "Numeracy: Additive Index"
// recast double numindex 

// *Numeracy Median Split
// summarize numindex 
// hist numindex, percent
// tabstat numindex, stat(p50)
// gen numeracysplit = numindex
// replace numeracysplit = 0 if numindex < 7
// replace numeracysplit = 1 if numindex > 7
// replace numeracysplit = 0 if numindex == 7
// label var numeracysplit ///
// "Numeracy: High/Low"
// label define numeracysplit ///
// 0 "0 Low numeracy" 1 "1 High numeracy"
// label values numeracysplit numeracysplit
// recast double numeracysplit

********************************** Interest ************************************

// *Following closely: reverse coded 
// gen shutdown1x = debt1 
// label var shutdown1x ///
// "Following government shutdown debate"
// label define shutdown1x ///
// 1 "1 Not closely at all" 2 "2 Not very closely" 3 "3 Somewhat closely" 4 "4 Very closely" 5 "5 Extremely closely" 
// label values shutdown1x shutdown1x 
// recast double shutdown1x 

// gen shutdown1 = (shutdown1x-1)/4
// label var shutdown1 ///
// "Following government shutdown debate"
// recast double shutdown1 

// *Understand the debate: reverse coded 
// gen shutdown2x = debt2
// label var shutdown2x ///
// "Understand government shutdown debate"
// label define shutdown2x ///
// 1 "1 Not well at all" 2 "2 Not very well" 3 "3 Somewhat well" 4 "4 Very well" 5 "5 Extremely well" 
// label values shutdown2x shutdown2x 
// recast double shutdown2x 

// gen shutdown2 = (shutdown2x-1)/4
// label var shutdown2 ///
// "Understand government shutdown debate"
// recast double shutdown2 

// *General political interest 
// gen interestx = interest 
// recode interestx (8=1)
// label var interestx ///
// "Interest"
// label define interestx ///
// 1 "1 Never" 2 "2 Some of the time" 3 "3 About half the time" 4 "4 Most of the time" 5 "5 Always"
// label values interestx interestx 
// recast double interestx 

// gen interest01 = (interestx-1)/4
// label var interest01 ///
// "Interest"
// recast double interest01

// alpha shutdown1 shutdown2 interest01, item
// factor shutdown1 shutdown2 interest01, ipf

// sumscale, f1(shutdown1 shutdown2 interest01)
// rename Factor1_average interestdebt 
// label var interestdebt ///
// "Interest in Politics/Government Shutdown Issue"
// recast double interestdebt 

************************************ Trust *************************************

// gen trustgovtx = trustgovt
// label var trustgovtx ///
// "Trust"
// label define trustgovtx ///
// 1 "1 Never" 2 "2 Some of the time" 3 "3 About half the time" 4 "4 Most of the time" 5 "5 Always"
// label values trustgovtx trustgovtx 
// recast double trustgovtx 

// gen trustgovt01 = (trustgovtx-1)/4
// label var trustgovt01 ///
// "Trust"
// recast double trustgovt01

****************************** Authoritarianism ********************************

// recode auth3 (0=1) (1=0)

// sumscale, f1(auth1 auth2 auth3 auth4) 
// rename Factor1_average author01 
// label var author01 ///
// "Authoritarianism"
// recast double author01

******************************* Need for Chaos *********************************

// sumscale, f1(chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7 chaos8)
// rename Factor1_average chaos8x
// label var chaos8x ///
// "Need for Chaos 8-Item" 
// recast double chaos8x 

// gen chaos801 = (chaos8x-1)/6 
// label var chaos801 ///
// "Need for Chaos 8-Item" 
// recast double chaos801

// sumscale, f1(chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7)
// rename Factor1_average chaos7x
// label var chaos7x ///
// "Need for Chaos 7-Item" 
// recast double chaos7x 

// gen chaos701 = (chaos7x-1)/6
// label var chaos701 ///
// "Need for Chaos 7-Item"
// recast double chaos701 

// factor chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7 chaos8, ipf
// factor chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7, ipf

****************************** Need for Closure ********************************

// sumscale, f1(closure_1 closure_2 closure_3 closure_4 closure_5 closure_6 closure_7 closure_8 closure_9 closure_10 closure_11 closure_12 closure_13 closure_14 closure_15)
// rename Factor1_average closurex 
// label var closurex ///
// "Need for Closure"
// recast double closurex 

// gen closure01 = (closurex-1)/10
// label var closure01 ///
// "Need for Closure"
// recast double closure01 

****************************** Need for Cognition ******************************

// *Reverse coded 
// gen cog1 = cognition_1 
// recode cog1 (1=5) (2=4) (4=2) (5=1)
// label define cog1 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog1 cog1 
// recast double cog1

// gen cog2 = cognition_2
// recode cog2 (1=5) (2=4) (4=2) (5=1)
// label define cog2 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog2 cog2 
// recast double cog2

// gen cog3 = cognition_3
// recode cog3 (1=5) (2=4) (4=2) (5=1)
// label define cog3 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog3 cog3 
// recast double cog3

// gen cog4 = cognition_4
// recode cog4 (1=5) (2=4) (4=2) (5=1)
// label define cog4 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog4 cog4 
// recast double cog4

// gen cog5 = cognition_5
// recode cog5 (1=5) (2=4) (4=2) (5=1)
// label define cog5 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog5 cog5 
// recast double cog5

// gen cog6 = cognition_6
// recode cog6 (1=5) (2=4) (4=2) (5=1)
// label define cog6 ///
// 1 "1 Strongly disagree" 2 "2 Disagree" 3 "3 Neither agree nor disagree" 4 "Agree" 5 "5 Strongly agree"
// label values cog6 cog6 
// recast double cog6

// sumscale, f1(cog1 cog2 cog3 cog4 cog5 cog6)
// rename Factor1_average cognitionx 
// label var cognitionx ///
// "Need for Cognition"
// recast double cognitionx

// gen cognition01 = (cognitionx-1)/4
// label var cognition01 ///
// "Need for Cognition"
// recast double cognition01

*********************************** Big Five ***********************************

// *Extraversion 
// gen extraversion101 = (TIPI_1-1)/6
// label var extraversion101 ///
// "Extraversion"
// recast double extraversion1

// gen extraversion2x = TIPI_6
// recode extraversion2x (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
// label var extraversion2x ///
// "Extraversion"
// recast double extraversion2x 

// gen extraversion201 = (extraversion2x-1)/6
// label var extraversion201 ///
// "Extraversion"
// recast double extraversion201

// sumscale, f1(extraversion101 extraversion201)
// rename Factor1_average extra
// label var extra ///
// "Extraversion"
// recast double extra

// *Agreeableness 
// gen agreeable1x = TIPI_2
// recode agreeable1x (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
// label var agreeable1x ///
// "Agreeableness"
// recast double agreeable1x 

// gen agreeable101 = (agreeable1x-1)/6
// label var agreeable101 ///
// "Agreeableness"
// recast double agreeable101

// gen agreeable201 = (TIPI_7-1)/6
// label var agreeable201 ///
// "Agreeableness"
// recast double agreeable201

// sumscale, f1(agreeable101 agreeable201)
// rename Factor1_average agree
// label var agree ///
// "Agreeableness"
// recast double agree

// *Conscientiousness 
// gen conscientious101 = (TIPI_3-1)/6
// label var conscientious101 ///
// "Conscientiousness"
// recast double conscientious101

// gen conscientious2x = TIPI_8
// recode conscientious2x (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
// label var conscientious2x ///
// "Conscientiousness"
// recast double conscientious2x 

// gen conscientious201 = (conscientious2x-1)/6
// label var conscientious201 ///
// "Conscientiousness"
// recast double conscientious201

// sumscale, f1(conscientious101 conscientious201)
// rename Factor1_average conscient
// label var conscient ///
// "Conscientiousness" 
// recast double conscient

// *Emotional Stability/Neuroticism
// gen emotional1x = TIPI_4
// recode emotional1x (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
// label var emotional1x ///
// "Emotional Stability"
// recast double emotional1x 

// gen emotional101 = (emotional1x-1)/6
// label var emotional101 ///
// "Emotional Stability"
// recast double emotional101

// gen emotional201 = (TIPI_9-1)/6
// label var emotional201 ///
// "Emotional Stability"
// recast double emotional201

// sumscale, f1(emotional101 emotional201)
// rename Factor1_average neuro
// label var neuro ///
// "Emotional Stability"
// recast double neuro 

// *Openness to Experiences

// gen openness101 = (TIPI_5-1)/6
// label var openness101 ///
// "Openness"
// recast double openness101

// gen openness2x = TIPI_10
// recode emotional1x (1=7) (2=6) (3=5) (5=3) (6=2) (7=1) 
// label var emotional1x ///
// "Openness"
// recast double emotional1x 

// gen openness201 = (openness2x-1)/6
// label var openness201 ///
// "Openness"
// recast double openness201

// sumscale, f1(openness101 openness201)
// rename Factor1_average open
// label var open ///
// "Openness"
// recast double open 

********************************** Experiment **********************************

*Gain and Loss frames are coded such that 1 indicates the modal response according to Prospect Theory (i.e., risk-averse re: gains; risk-seeking re: losses); "Risky" indicates whether one preferred the risky Deal B, regardless of frame.

// *Gain Frame
// gen gain01 = gain
// recode gain01 (2=0)
// label var gain01 ///
// "Gain Frame: Risk Averse"
// label define gain01 ///
// 0 "0 Deal B" 1 "1 Deal A"
// label values gain01 gain01 
// recast double gain01 

// *Loss Frame
// gen loss01 = loss
// recode loss01 (3=0) (4=1)
// label var loss01 ///
// "Loss Frame: Risk Seeking"
// label define loss01 ///
// 0 "0 Deal A" 1 "1 Deal B"
// label values loss01 loss01 
// recast double loss01 

// *Frame
// gen frame = .
// replace frame = 0 if gain01 == 0 | gain01 == 1
// replace frame = 1 if loss01 == 0 | loss01 == 1
// label var frame ///
// "Frame"
// label define frame ///
// 0 "Gain Frame" 1 "Loss Frame"
// label values frame frame 
// recast double frame 

// *Risky Choice 
// gen risky = .
// replace risky = 0 if gain01 == 1 | loss01 == 0
// replace risky = 1 if gain01 == 0 | loss01 == 1
// label define risky ///
// 0 "Certain Deal A" 1 "Risky Deal B"
// label var risky "Risky Choice"
// label values risky risky 
// recast double risky

********************************* Social Status ********************************

// gen socialx = Q380
// label var socialx ///
// "Perceived Social Status"
// label define socialx ///
// 1 "1 Step 1: Bottom of the ladder" 10 "10 Step 10: Top of the ladder"
// label values socialx socialx 
// recast double socialx 

// gen social01 = (socialx-1)/9
// label var social01 ///
// "Perceived Social Status"
// recast double social01 

************************************* CRT **************************************

// *CRT 1 (Correct Answer: 5 cents)
// tab crt1 
// gen crt1x = crt1 
// replace crt1x = "0" if crt1 == "1"
// replace crt1x = "1" if crt1 == "$0.05"
// replace crt1x = "1" if crt1 == "5 cents."
// replace crt1x = "1" if crt1 == "$.05"
// replace crt1x = "1" if crt1 == "$0.05"
// replace crt1x = "1" if crt1 == "$0.05 "
// replace crt1x = "1" if crt1 == "$0.05 (5 cents)"
// replace crt1x = "1" if crt1 == "..05"
// replace crt1x = "1" if crt1 == ".05"
// replace crt1x = "1" if crt1 == ".05 cents"
// replace crt1x = "1" if crt1 == ".05$"
// replace crt1x = "1" if crt1 == ".o5"
// replace crt1x = "1" if crt1 == "0.05"
// replace crt1x = "1" if crt1 == "0.05$"
// replace crt1x = "1" if crt1 == "5 cent"
// replace crt1x = "1" if crt1 == "5 cents"
// replace crt1x = "1" if crt1 == "5 cents "
// replace crt1x = "1" if crt1 == "5 cents or a nickel"
// replace crt1x = "1" if crt1 == "5¢"
// replace crt1x = "1" if crt1 == "Five cent"
// replace crt1x = "1" if crt1 == "Five cents"
// replace crt1x = "1" if crt1 == "The ball cost 5 cents "
// replace crt1x = "1" if crt1 == "nickel"

// destring crt1x, generate(c1) force
// recode c1 (1=1) (nonmiss = 0) (miss = 0)
// recast double c1

// *CRT 2 (Correct Answer: 5 minutes)
// tab crt2 
// gen crt2x = crt2 
// replace crt2x = "0" if crt2 == "1"
// replace crt2x = "1" if crt2 == " 5"
// replace crt2x = "1" if crt2 == "5 minutes"
// replace crt2x = "1" if crt2 == "5"
// replace crt2x = "1" if crt2 == "5 "
// replace crt2x = "1" if crt2 == "5 MIN"
// replace crt2x = "1" if crt2 == "5 MINUTES"
// replace crt2x = "1" if crt2 == "5 MINUTES "
// replace crt2x = "1" if crt2 == "5 Minutes"
// replace crt2x = "1" if crt2 == "5 Minutes "
// replace crt2x = "1" if crt2 == "5 m inutes"
// replace crt2x = "1" if crt2 == "5 min"
// replace crt2x = "1" if crt2 == "5 min "
// replace crt2x = "1" if crt2 == "5 min. "
// replace crt2x = "1" if crt2 == "5 min24"
// replace crt2x = "1" if crt2 == "5 minit" 
// replace crt2x = "1" if crt2 == "5 mins"
// replace crt2x = "1" if crt2 == "5 mins "
// replace crt2x = "1" if crt2 == "5 minute"
// replace crt2x = "1" if crt2 == "5 minutes"
// replace crt2x = "1" if crt2 == "5 minutes "
// replace crt2x = "1" if crt2 == "5 minutes to 100 widgets"
// replace crt2x = "1" if crt2 == "5 minutes… it takes each machine 5 min to create 1 widget I think…"
// replace crt2x = "1" if crt2 == "5 minutos"
// replace crt2x = "1" if crt2 == "5min"
// replace crt2x = "1" if crt2 == "5min "
// replace crt2x = "1" if crt2 == "5mins"
// replace crt2x = "1" if crt2 == "5minutes"
// replace crt2x = "1" if crt2 == "Five minute "
// replace crt2x = "1" if crt2 == "five minutes"

// destring crt2x, generate(c2) force
// recode c2 (1=1) (nonmiss = 0) (miss = 0)
// recast double c2

// *CRT 3 (Correct Answer: 47 days)
// tab crt3
// gen crt3x = crt3
// replace crt3x = "0" if crt3 == "1"
// replace crt3x = "1" if crt3 == "47 days"
// replace crt3x = "1" if crt3 == "47"
// replace crt3x = "1" if crt3 == "47 "
// replace crt3x = "1" if crt3 == "47 DAYS"
// replace crt3x = "1" if crt3 == "47 Days"
// replace crt3x = "1" if crt3 == "47 dayes"
// replace crt3x = "1" if crt3 == "47 days"
// replace crt3x = "1" if crt3 == "47 days aprox"
// replace crt3x = "1" if crt3 == "47 days."
// replace crt3x = "1" if crt3 == "47days"
// replace crt3x = "1" if crt3 == "About 47 days, assuming a controlled unchanging environment."
// replace crt3x = "1" if crt3 == "Since the patch doubles in size every day, if it covered the entire lake on the 48th day, it must have covered half of the lake on the 47th day. Therefore, it would take 47 days for the patch to cover half of the lake."
// replace crt3x = "1" if crt3 == "it would take 47 days for the patch to cover half of the lake."

// destring crt3x, generate(c3) force
// recode c3 (1=1) (nonmiss = 0) (miss = 0)
// recast double c3

// *Cognitive Reflection Index
// sumscale, f1(c1 c2 c3) fdummy
// rename Factor1_dsum cogreflectx
// label var cogreflectx ///
// "Cognitive Reflection Index"
// recast double cogreflectx 

// gen cogreflect01 = (cogreflectx)/3
// label var cogreflect01 ///
// "Cognitive Reflection Index"
// recast double cogreflect01 

************************************ White ID **********************************

// *White ID
// tab imp_white
// gen imp_white2 = imp_white
// recode imp_white2 (1=5) (2=4) (4=2) (5=1) 

// tab wethey_white
// gen wethey_white2 = wethey_white
// recode wethey_white (1=5) (2=4) (4=2) (5=1) 

// tab proud_white
// gen proud_white2 = proud_white
// recode proud_white (1=5) (2=4) (4=2) (5=1) 

// alpha imp_white2 wethey_white2 proud_white2, item
// factor imp_white2 wethey_white2 proud_white2, ipf
// sumscale, f1(imp_white2 wethey_white2 proud_white2)
// rename Factor1_average whiteidx

// gen whiteid = (whiteidx-1)/4
// label var whiteid ///
// "White ID"
// recast double whiteid

*********************************** Other IDs **********************************

// *Hispanic 
// tab imp_hisp 
// gen imp_hisp2 = imp_hisp
// recode imp_hisp2 (1=5) (2=4) (4=2) (5=1) 

// tab wethey_hisp
// gen wethey_hisp2 = wethey_hisp
// recode wethey_hisp2 (1=5) (2=4) (4=2) (5=1) 

// tab proud_hisp
// gen proud_hisp2 = proud_hisp
// recode proud_hisp2 (1=5) (2=4) (4=2) (5=1) 

// alpha imp_hisp2 wethey_hisp2 proud_hisp2, item
// factor imp_hisp2 wethey_hisp2 proud_hisp2, ipf
// sumscale, f1(imp_hisp2 wethey_hisp2 proud_hisp2)
// rename Factor1_average hispidx

// gen hispid = (hispidx-1)/4
// label var hispid ///
// "Hispanic ID"
// recast double hispid 

// *Native Hawaiian/Pacific Islander 
// tab imp_hawaiian
// gen imp_hawaiian2 = imp_hawaiian
// recode imp_hawaiian2 (1=5) (2=4) (4=2) (5=1) 

// tab wethey_hawaiian
// gen wethey_hawaiian2 = wethey_hawaiian
// recode wethey_hawaiian2 (1=5) (2=4) (4=2) (5=1) 

// tab proud_nh
// gen proud_nh2 = proud_nh
// recode proud_nh2 (1=5) (2=4) (4=2) (5=1) 

// alpha imp_hawaiian2 wethey_hawaiian2 proud_nh2, item
// factor imp_hawaiian2 wethey_hawaiian2 proud_nh2, ipf
// sumscale, f1(imp_hawaiian2 wethey_hawaiian2 proud_nh2)
// rename Factor1_average nhpiidx

// gen nhpiid = (nhpiidx-1)/4
// label var nhpiid ///
// "Native Hawaiian/Pacific Islander ID"
// recast double nhpiid 

// *American Indian/Alaska Native ID
// tab imp_native
// gen imp_native2 = imp_native
// recode imp_native2 (1=5) (2=4) (4=2) (5=1) 

// tab wethey_native
// gen wethey_native2 = wethey_native
// recode wethey_native2 (1=5) (2=4) (4=2) (5=1) 

// tab proud_am
// gen proud_am2 = proud_am
// recode proud_am2 (1=5) (2=4) (4=2) (5=1) 

// alpha imp_native2 wethey_native2 proud_am2, item
// factor imp_native2 wethey_native2 proud_am2, ipf
// sumscale, f1(imp_native2 wethey_native2 proud_am2)
// rename Factor1_average nativeidx 

// gen nativeid = (nativeidx-1)/4
// label var nativeid ///
// "American Indian/Alaska Native ID"
// recast double nativeid 

// *Asian
// tab imp_asian
// gen imp_asian2 = imp_asian
// recode imp_asian2 (1=5) (2=4) (4=2) (5=1) 

// tab wethey_asian
// gen wethey_asian2 = wethey_asian
// recode wethey_asian2 (1=5) (2=4) (4=2) (5=1) 

// tab proud_asian
// gen proud_asian2 = proud_asian
// recode proud_asian2 (1=5) (2=4) (4=2) (5=1) 

// alpha imp_asian2 wethey_asian2 proud_asian2, item
// factor imp_asian2 wethey_asian2 proud_asian2, ipf
// sumscale, f1(imp_asian2 wethey_asian2 proud_asian2)
// rename Factor1_average asianidx 

// gen asianid = (asianidx-1)/4
// label var asianid ///
// "Asian ID"
// recast double asianid 

// *Black
// tab imp_black
// gen imp_black2 = imp_black
// recode imp_black (1=5) (2=4) (4=2) (5=1) 

// tab wethey_black
// gen wethey_black2 = wethey_black
// recode wethey_black2 (1=5) (2=4) (4=2) (5=1) 
//
// tab proud_black
// gen proud_black2 = proud_black
// recode proud_black (1=5) (2=4) (4=2) (5=1) 

// alpha imp_black2 wethey_black2 proud_black2, item
// factor imp_black2 wethey_black2 proud_black2, ipf 
// sumscale, f1(imp_black2 wethey_black2 proud_black2)
// rename Factor1_average blackidx

// gen blackid = (blackidx-1)/3.3333333
// label var blackid ///
// "Black ID"
// recast double blackid 

********************************************************************************
********************************* Main Analysis ******************************** 
********************************************************************************

*Sample reference
regress risky chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro 

*Items in Need for Chaos Scale (Table 2)
summarize chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7 if e(sample), detail
alpha chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7 if e(sample), item
factor chaos1 chaos2 chaos3 chaos4 chaos5 chaos6 chaos7 if e(sample), ipf

*Need for Chaos Scale
summarize chaos701 if e(sample), detail
tab chaos701 if e(sample)

*Distribution of Need for Chaos (Figure 2)
hist chaos7x if e(sample), percent 
graph save chaoshist1, replace

*Correlates of NFChaos (Figure 3): If statement adjusts the sample so it includes only the respondents in the main results
regress chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro if risky == 0 | risky == 1
estimates store fig3 

coefplot fig3, drop(_cons)

*Test Prospect Theory 
tab gain01 if e(sample)
tab loss01 if e(sample)
summarize gain01 loss01 if e(sample)

*Main Results (Table 3)
logit risky frame if e(sample)

logit risky frame##c.chaos701 if e(sample)

logit risky frame##c.chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro 

*Predicted Probabilities (Figure 4)
margins, dydx(chaos701) at(frame=(0 1))
margins, at(chaos701=(0 .0238095 .0277778 .047619 .0714286 .0952381 .1190476 .1428571 .1666667 .1904762 .2142857 .2380952 .2619047 .2857143 .3095238 .3333333 .3571428 .3809524 .4047619 .4285714 .4523809 .4761905 .5 .5238095 .547619 .5714285 .5952381 .6190476 .6428571 .6666667 .6904762 .7142857 .7380952 .7619048 .7857143 .8095238 .8333333 .8571429 .8809524 .9047619 .9285715 .952381 .9761905 1) frame=(0 1))
marginsplot, legend(col(2) pos(6) size(vsmall) region(lstyle(none)))

*Post-estimation tests
margins frame, at(chaos701 = .4)
margins frame, at(chaos701 = .4) pwcompare(effects) 

margins frame, at(chaos701 = .5)
margins frame, at(chaos701 = .5) pwcompare(effects) 

margins frame, at(chaos701 = .6)
margins frame, at(chaos701 = .6) pwcompare(effects) 

margins frame, at(chaos701 = .7)
margins frame, at(chaos701 = .7) pwcompare(effects) 

margins frame, at(chaos701 = .8)
margins frame, at(chaos701 = .8) pwcompare(effects) 

margins frame, at(chaos701 = .9)
margins frame, at(chaos701 = .9) pwcompare(effects) 

margins frame, at(chaos701 = 1)
margins frame, at(chaos701 = 1) pwcompare(effects) 

********************************************************************************
**************************** Supplementary Material **************************** 
********************************************************************************

*Summary Statistics: If statement adjusts the sample so it includes only the respondents in the main results
summarize gain01 loss01 chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro social01 cogreflect01 whiteid if e(sample)

*Correlates of Need for Chaos (Model 3): If statement adjusts the sample so it includes only the respondents in the main results
regress chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro if risky == 0 | risky == 1

*Correlates of Need for Chaos (Model 4): If statement adjusts the sample so it includes only the respondents in the main results
regress chaos701 age01 race01 ethnicity01 gender01 income01 education01 religion01 pid701 polknow01 trustgovt01 interestdebt numeracysplit cognition01 closure01 author01 open conscient extra agree neuro social01 cogreflect01 whiteid if risky == 0 | risky == 1
